# -*- coding: utf-8 -*-

import arcpy
import os

path = r"D:\质检\扎鲁特旗\土地利用总体规划图".decode("utf-8")
arcpy.env.workspace = path
os.chdir(path)
all = os.listdir(path)
for each in all:
    if each.endswith(".mxd"):
        mxd = arcpy.mapping.MapDocument(each)
        mxd.findAndReplaceWorkspacePaths(r"DLJX", r"")
        mxd.saveACopy("9"+each,"9.3")
        del mxd
        os.remove(each)
        os.rename("9"+each,each)